package com.wsoft.cms.query.announcement;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;

/**
 * @Author z001
 * @Date 2024/11/27 14:42
 */
@Data
public class AnnouncementBaseQuery {
    @Schema(description = "分类id")
    @NotNull(message = "分类id不能为空")
    private Long categoryId;

    @Schema(description = "标题")
    @NotBlank(message = "标题不能为空")
    private String title;

    @Schema(description = "内容")
    @NotBlank(message = "标题不能为空")
    private String msgContent;

    @Schema(description = "开始时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime startTime;

    @Schema(description = "结束时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime endTime;

    @Schema(description = "优先级（L低，M中，H高）")
    private String priority;

    @Schema(description = "通告对象类型（ALL:全体用户,ORG:指定组织,POST:指定岗位,LEVEL：指定职务级别，MEMBER:指定用户）")
    @NotBlank(message = "通告对象类型不能为空")
    private String msgType;

    @Schema(description = "指定对象")
    private String msgIds;

    @Schema(description = "设备端")
    private String device;

    @Schema(description = "摘要")
    private String annoAbstract;

    @Schema(description = "关键字")
    private String keyword;

    @Schema(description = "是否置顶")
    private Integer isTop;

    @Schema(description = "置顶时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime topTime;

    @Schema(description = "是否消息提醒")
    @NotNull(message = "是否消息提醒不能为空")
    private Integer isWarm;

    @Schema(description = "是否开启评论")
    @NotNull(message = "是否开启评论不能为空")
    private Integer isComment;

    @Schema(description = "是否需要报名")
    @NotNull(message = "是否需要报名不能为空")
    private Integer isSign;

    @Schema(description = "发布时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime sendTime;

    @Schema(description = "发布单位")
    private Long sendOrgId;

    @Schema(description = "发布人")
    private Long sendMemberId;
}
